﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Diagnostics;

namespace SmallProgramWeb
{
    public partial class program : System.Web.UI.Page
    {
        private string programID;
        public string ProgramID
        {
            get
            {
                return this.programID;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            string queryString = Convert.ToString(Page.Request.QueryString);
            int programId;
            if (int.TryParse(queryString, out programId))
            {
                Service service = new Service();
                string programCode = service.LoadProgram(programId.ToString());
                this.textBoxProgram.Text = programCode;
                this.programID = programId.ToString();
                this.titleLiteral.Text = this.programID;
            }
        }
    }
}